﻿using Factory.RBAC.Permissions.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace Factory.RBAC.Permissions
{
    public interface IPermissionsAppService:IApplicationService
    {
        /// <summary>
        /// 树形权限
        /// </summary>
        /// <returns></returns>
        Task<List<TreePermissionDto>> TreePermission();


        /// <summary>
        /// 获取具体数据进行反填
        /// </summary>
        /// <returns></returns>
        Task<Permission> GetPermission(int id);

        /// <summary>
        /// 添加子集权限
        /// </summary>
        /// <returns>返回受影响行数</returns>
        Task<int> AddSon(Permission permission);

        /// <summary>
        /// 添加同集权限
        /// </summary>
        /// <returns>返回受影响行数</returns>
        Task<int> AddEquality(Permission permission);


        /// <summary>
        /// 修改权限
        /// </summary>
        /// <returns>返回受影响行数</returns>
        Task<int> AddUpdate(PermissionDto permission);
    }
}
